package com.leapp.sk.viewdelegate.adapter.classs

import android.widget.ImageView
import android.widget.TextView
import com.example.mvp.delegate.BaseAdapterDelegate
import com.leapp.sk.R
import com.leapp.sk.bean.ChoseClassEntity

/**
 * 选择班级视图托管类
 * @author  chaohaipeng  on 2018/8/2.
 */
class ChoseClassAdapterDelegate: BaseAdapterDelegate() {
    override fun getOptionsMenuId(): Int {
        return 0
    }
    override fun initWidget() {
    }
    override fun onDestroy() {
    }
    override fun initLayoutRes(): Int {
        return R.layout.adapter_chose_class
    }

    /**
     * 初始化数据
     */
     fun initData(data: ChoseClassEntity){
        val iv_att_chose = getView<ImageView>(R.id.iv_att_chose)
         val tv_acc_class_name = getView<TextView>(R.id.tv_acc_class_name)
         val tv_acc_class_number = getView<TextView>(R.id.tv_acc_class_number)
        tv_acc_class_name.text=data.className
          if (data.isCheck){
              iv_att_chose.isSelected=true
          }else{
              iv_att_chose.isSelected=false
          }

     }



}